<template>
  <div class="not-found-container">
    <div class="error-card">
      <div class="error-icon">
        <div class="number">404</div>
        <div class="icon">
          <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="#3b82f6">
            <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
          </svg>
        </div>
      </div>
      
      <h1 class="error-title">{{ $t('errorPage.notFoundTitle') }}</h1>
      <p class="error-message">{{ $t('errorPage.notFoundMessage') }}</p>
      
      <div class="action-buttons">
        <button @click="$router.push('/')" class="primary-btn">
          {{ $t('errorPage.backToHome') }}
        </button>
        <button @click="$router.go(-1)" class="secondary-btn">
          {{ $t('errorPage.backToPrevious') }}
        </button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'NotFound',
  data() {
    return {
    }
  },
  mounted() {
    // 设置页面标题
    document.title = this.$t('errorPage.pageTitle')
  }
}
</script>

<style scoped>
.not-found-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1e293b;
  text-align: center;
}

.error-card {
  background: white;
  border-radius: 12px;
  padding: 60px 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.error-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.error-icon {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
}

.number {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 96px;
  font-weight: 700;
  color: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.error-title {
  font-size: 32px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 15px;
}

.error-message {
  font-size: 18px;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.5;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background-color: #3b82f6;
  color: white;
}

.primary-btn:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: #f1f5f9;
  color: #334155;
}

.secondary-btn:hover {
  background-color: #e2e8f0;
  transform: translateY(-2px);
}

.market-suggestion {
  background: white;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.market-suggestion h3 {
  font-size: 20px;
  color: #0f172a;
  margin: 0 0 25px;
}

.crypto-suggestions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.crypto-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.crypto-item:hover {
  background-color: #f0f9ff;
  transform: translateY(-3px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.coin-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.coin-info {
  text-align: left;
}

.coin-name {
  font-weight: 600;
  color: #0f172a;
}

.coin-symbol {
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .error-card {
    padding: 40px 20px;
  }
  
  .error-title {
    font-size: 26px;
  }
  
  .error-message {
    font-size: 16px;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .primary-btn, .secondary-btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .error-icon {
    width: 100px;
    height: 100px;
  }
  
  .number {
    font-size: 72px;
  }
  
  .crypto-item {
    width: 100%;
    justify-content: center;
  }
}
</style>
    